package max.ta.data.plot.gen;



import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import max.ta.data.Function;
import max.ta.data.plot.data.MathPoint;


public class TimeSerieDataGenerator
	extends DataGenerator<Date, Double> {

    private final Function<Date, Double> function;
    private final Date minX;
    private final Date maxX;
    private final List<MathPoint<Date, Double>> points = new ArrayList<MathPoint<Date, Double>>();

    public TimeSerieDataGenerator(Function<Date, Double> function, Date minX, Date maxX) {
	super();
	this.function = function;
	this.minX = minX;
	this.maxX = maxX;
    }


    @Override
    public List<MathPoint<Date, Double>> generate() {
	/*
	 * final double delta = (maxX - minX) / MAX_POINTS; points.clear(); for (int i = 0; i < MAX_POINTS; i++) { final double x = points.isEmpty() ?
	 * minX : points.get(i - 1).getX() + delta; final double y = function.compute(x); final MathPoint<Double, Double> point = new MathPoint<Double,
	 * Double>(x, y); points.add(point); }
	 */
	return points;
    }




}
